<template>
	<view class="contentA">
		<view class="title">子组件A</view>
		<view class="coma_box">
			<text>父组件传进来的值：</text>
			<text style="font-weight: bold;color:red">{{intent}}</text>
		</view>
		<button type="primary" @click="sendData()">传值给CompB组件</button>
		
	</view>
</template>

<script>
	export default {
		name:"compA",
		props:['intent','xxx'],
		
		data() {
			return {
				
			};
		},
		created() {
			console.log("created comA");
		},
		mounted() {
			console.log("mounted comA");
		},
		methods:{
			sendData(){
				console.log("-------compA----");
				uni.$emit('fasong',this.intent);
		}
		
		}
	}
</script>

<style>
.contentA{
	margin-left: 20rpx;
    background-color: #ffbe4e;
	
	padding: 20px;
	display: flex1;
	margin-right: 20rpx;
	
}
.title{
	font-size: 50rpx;
	text-align: center;
	margin: 10rpx;
}
.coma_box{
	margin-bottom: 20rpx;
}
.btn_A{
	background-color: #55aaff;
	color: white;
}
</style>